import random
import string

def ran_str(len):
    str = ''.join(random.sample(string.ascii_letters + string.digits, len))
    return str

def int_to_hexstr(x, length):
    s = str(hex(x))
    s = s[2:]
    while(len(s) < length):
        s = '0'+s
    return s

def hexstr_to_int(x):
    return int(x, 16)


#print(int_to_hexstr(1000,4))
print(hexstr_to_int("00001"))